
export const useUtils = () => {
	//流式输出文字
	const outputText = (text : string) => {
		return new Promise((resolve, reject) => {
			var index = 0
			const streamOutput = () => {
				if (index < text.length) {
					var currentText = text.substring(0, index + 1)
					index++
				} else {
					clearInterval(timer)
				}
				// console.log(currentText,"888888")
				resolve(currentText)
			}
			let timer = setInterval(streamOutput, 20)
		})
	}
	return {
		outputText
	}
}